Integrand size = 14, antiderivative size = 150 \[ \int \frac {1}{\left (c+\frac {a}{x^2}+\frac {b}{x}\right )^2} \, dx=\frac {2 \left (b^2-3 a c\right ) x}{c^2 \left (b^2-4 a c\right )}-\frac {b x^2}{c \left (b^2-4 a c\right )}+\frac {x^3 (2 a+b x)}{\left (b^2-4 a c\right ) \left (a+b x+c x^2\right )}-\frac {2 \left (b^4-6 a b^2 c+6 a^2 c^2\right ) \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c^3 \left (b^2-4 a c\right )^{3/2}}-\frac {b \log \left (a+b x+c x^2\right )}{c^3} \]
[Out]
Time = 0.10 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {1354, 752, 814, 648, 632, 212, 642} \[ \int \frac {1}{\left (c+\frac {a}{x^2}+\frac {b}{x}\right )^2} \, dx=-\frac {2 \left (6 a^2 c^2-6 a b^2 c+b^4\right ) \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c^3 \left (b^2-4 a c\right )^{3/2}}+\frac {2 x \left (b^2-3 a c\right )}{c^2 \left (b^2-4 a c\right )}-\frac {b x^2}{c \left (b^2-4 a c\right )}+\frac {x^3 (2 a+b x)}{\left (b^2-4 a c\right ) \left (a+b x+c x^2\right )}-\frac {b \log \left (a+b x+c x^2\right )}{c^3} \]
[In]
[Out]
Rule 212
Rule 632
Rule 642
Rule 648
Rule 752
Rule 814
Rule 1354
Rubi steps \begin{align*} \text {integral}& = \int \frac {x^4}{\left (a+b x+c x^2\right )^2} \, dx \\ & = \frac {x^3 (2 a+b x)}{\left (b^2-4 a c\right ) \left (a+b x+c x^2\right )}+\frac {\int \frac {x^2 (6 a+2 b x)}{a+b x+c x^2} \, dx}{-b^2+4 a c} \\ & = \frac {x^3 (2 a+b x)}{\left (b^2-4 a c\right ) \left (a+b x+c x^2\right )}+\frac {\int \left (-\frac {2 \left (b^2-3 a c\right )}{c^2}+\frac {2 b x}{c}+\frac {2 \left (a \left (b^2-3 a c\right )+b \left (b^2-4 a c\right ) x\right )}{c^2 \left (a+b x+c x^2\right )}\right ) \, dx}{-b^2+4 a c} \\ & = \frac {2 \left (b^2-3 a c\right ) x}{c^2 \left (b^2-4 a c\right )}-\frac {b x^2}{c \left (b^2-4 a c\right )}+\frac {x^3 (2 a+b x)}{\left (b^2-4 a c\right ) \left (a+b x+c x^2\right )}-\frac {2 \int \frac {a \left (b^2-3 a c\right )+b \left (b^2-4 a c\right ) x}{a+b x+c x^2} \, dx}{c^2 \left (b^2-4 a c\right )} \\ & = \frac {2 \left (b^2-3 a c\right ) x}{c^2 \left (b^2-4 a c\right )}-\frac {b x^2}{c \left (b^2-4 a c\right )}+\frac {x^3 (2 a+b x)}{\left (b^2-4 a c\right ) \left (a+b x+c x^2\right )}-\frac {b \int \frac {b+2 c x}{a+b x+c x^2} \, dx}{c^3}+\frac {\left (b^4-6 a b^2 c+6 a^2 c^2\right ) \int \frac {1}{a+b x+c x^2} \, dx}{c^3 \left (b^2-4 a c\right )} \\ & = \frac {2 \left (b^2-3 a c\right ) x}{c^2 \left (b^2-4 a c\right )}-\frac {b x^2}{c \left (b^2-4 a c\right )}+\frac {x^3 (2 a+b x)}{\left (b^2-4 a c\right ) \left (a+b x+c x^2\right )}-\frac {b \log \left (a+b x+c x^2\right )}{c^3}-\frac {\left (2 \left (b^4-6 a b^2 c+6 a^2 c^2\right )\right ) \text {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{c^3 \left (b^2-4 a c\right )} \\ & = \frac {2 \left (b^2-3 a c\right ) x}{c^2 \left (b^2-4 a c\right )}-\frac {b x^2}{c \left (b^2-4 a c\right )}+\frac {x^3 (2 a+b x)}{\left (b^2-4 a c\right ) \left (a+b x+c x^2\right )}-\frac {2 \left (b^4-6 a b^2 c+6 a^2 c^2\right ) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c^3 \left (b^2-4 a c\right )^{3/2}}-\frac {b \log \left (a+b x+c x^2\right )}{c^3} \\ \end{align*}
Time = 0.13 (sec) , antiderivative size = 132, normalized size of antiderivative = 0.88 \[ \int \frac {1}{\left (c+\frac {a}{x^2}+\frac {b}{x}\right )^2} \, dx=\frac {c x+\frac {-b^4 x-a b^2 (b-4 c x)+a^2 c (3 b-2 c x)}{\left (b^2-4 a c\right ) (a+x (b+c x))}-\frac {2 \left (b^4-6 a b^2 c+6 a^2 c^2\right ) \arctan \left (\frac {b+2 c x}{\sqrt {-b^2+4 a c}}\right )}{\left (-b^2+4 a c\right )^{3/2}}-b \log (a+x (b+c x))}{c^3} \]
[In]
[Out]
Time = 0.16 (sec) , antiderivative size = 198, normalized size of antiderivative = 1.32
method | result | size |
default | \(\frac {x}{c^{2}}-\frac {\frac {-\frac {\left (2 a^{2} c^{2}-4 a \,b^{2} c +b^{4}\right ) x}{c \left (4 a c -b^{2}\right )}+\frac {b a \left (3 a c -b^{2}\right )}{c \left (4 a c -b^{2}\right )}}{c \,x^{2}+b x +a}+\frac {\frac {\left (4 a b c -b^{3}\right ) \ln \left (c \,x^{2}+b x +a \right )}{c}+\frac {4 \left (3 c \,a^{2}-b^{2} a -\frac {\left (4 a b c -b^{3}\right ) b}{2 c}\right ) \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}}{4 a c -b^{2}}}{c^{2}}\) | \(198\) |
risch | \(\text {Expression too large to display}\) | \(1176\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 409 vs. \(2 (146) = 292\).
Time = 0.30 (sec) , antiderivative size = 837, normalized size of antiderivative = 5.58 \[ \int \frac {1}{\left (c+\frac {a}{x^2}+\frac {b}{x}\right )^2} \, dx=\left [-\frac {a b^{5} - 7 \, a^{2} b^{3} c + 12 \, a^{3} b c^{2} - {\left (b^{4} c^{2} - 8 \, a b^{2} c^{3} + 16 \, a^{2} c^{4}\right )} x^{3} - {\left (b^{5} c - 8 \, a b^{3} c^{2} + 16 \, a^{2} b c^{3}\right )} x^{2} + {\left (a b^{4} - 6 \, a^{2} b^{2} c + 6 \, a^{3} c^{2} + {\left (b^{4} c - 6 \, a b^{2} c^{2} + 6 \, a^{2} c^{3}\right )} x^{2} + {\left (b^{5} - 6 \, a b^{3} c + 6 \, a^{2} b c^{2}\right )} x\right )} \sqrt {b^{2} - 4 \, a c} \log \left (\frac {2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c + \sqrt {b^{2} - 4 \, a c} {\left (2 \, c x + b\right )}}{c x^{2} + b x + a}\right ) + {\left (b^{6} - 9 \, a b^{4} c + 26 \, a^{2} b^{2} c^{2} - 24 \, a^{3} c^{3}\right )} x + {\left (a b^{5} - 8 \, a^{2} b^{3} c + 16 \, a^{3} b c^{2} + {\left (b^{5} c - 8 \, a b^{3} c^{2} + 16 \, a^{2} b c^{3}\right )} x^{2} + {\left (b^{6} - 8 \, a b^{4} c + 16 \, a^{2} b^{2} c^{2}\right )} x\right )} \log \left (c x^{2} + b x + a\right )}{a b^{4} c^{3} - 8 \, a^{2} b^{2} c^{4} + 16 \, a^{3} c^{5} + {\left (b^{4} c^{4} - 8 \, a b^{2} c^{5} + 16 \, a^{2} c^{6}\right )} x^{2} + {\left (b^{5} c^{3} - 8 \, a b^{3} c^{4} + 16 \, a^{2} b c^{5}\right )} x}, -\frac {a b^{5} - 7 \, a^{2} b^{3} c + 12 \, a^{3} b c^{2} - {\left (b^{4} c^{2} - 8 \, a b^{2} c^{3} + 16 \, a^{2} c^{4}\right )} x^{3} - {\left (b^{5} c - 8 \, a b^{3} c^{2} + 16 \, a^{2} b c^{3}\right )} x^{2} + 2 \, {\left (a b^{4} - 6 \, a^{2} b^{2} c + 6 \, a^{3} c^{2} + {\left (b^{4} c - 6 \, a b^{2} c^{2} + 6 \, a^{2} c^{3}\right )} x^{2} + {\left (b^{5} - 6 \, a b^{3} c + 6 \, a^{2} b c^{2}\right )} x\right )} \sqrt {-b^{2} + 4 \, a c} \arctan \left (-\frac {\sqrt {-b^{2} + 4 \, a c} {\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) + {\left (b^{6} - 9 \, a b^{4} c + 26 \, a^{2} b^{2} c^{2} - 24 \, a^{3} c^{3}\right )} x + {\left (a b^{5} - 8 \, a^{2} b^{3} c + 16 \, a^{3} b c^{2} + {\left (b^{5} c - 8 \, a b^{3} c^{2} + 16 \, a^{2} b c^{3}\right )} x^{2} + {\left (b^{6} - 8 \, a b^{4} c + 16 \, a^{2} b^{2} c^{2}\right )} x\right )} \log \left (c x^{2} + b x + a\right )}{a b^{4} c^{3} - 8 \, a^{2} b^{2} c^{4} + 16 \, a^{3} c^{5} + {\left (b^{4} c^{4} - 8 \, a b^{2} c^{5} + 16 \, a^{2} c^{6}\right )} x^{2} + {\left (b^{5} c^{3} - 8 \, a b^{3} c^{4} + 16 \, a^{2} b c^{5}\right )} x}\right ] \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 842 vs. \(2 (141) = 282\).
Time = 1.07 (sec) , antiderivative size = 842, normalized size of antiderivative = 5.61 \[ \int \frac {1}{\left (c+\frac {a}{x^2}+\frac {b}{x}\right )^2} \, dx=\left (- \frac {b}{c^{3}} - \frac {\sqrt {- \left (4 a c - b^{2}\right )^{3}} \cdot \left (6 a^{2} c^{2} - 6 a b^{2} c + b^{4}\right )}{c^{3} \cdot \left (64 a^{3} c^{3} - 48 a^{2} b^{2} c^{2} + 12 a b^{4} c - b^{6}\right )}\right ) \log {\left (x + \frac {- 10 a^{2} b c - 16 a^{2} c^{4} \left (- \frac {b}{c^{3}} - \frac {\sqrt {- \left (4 a c - b^{2}\right )^{3}} \cdot \left (6 a^{2} c^{2} - 6 a b^{2} c + b^{4}\right )}{c^{3} \cdot \left (64 a^{3} c^{3} - 48 a^{2} b^{2} c^{2} + 12 a b^{4} c - b^{6}\right )}\right ) + 2 a b^{3} + 8 a b^{2} c^{3} \left (- \frac {b}{c^{3}} - \frac {\sqrt {- \left (4 a c - b^{2}\right )^{3}} \cdot \left (6 a^{2} c^{2} - 6 a b^{2} c + b^{4}\right )}{c^{3} \cdot \left (64 a^{3} c^{3} - 48 a^{2} b^{2} c^{2} + 12 a b^{4} c - b^{6}\right )}\right ) - b^{4} c^{2} \left (- \frac {b}{c^{3}} - \frac {\sqrt {- \left (4 a c - b^{2}\right )^{3}} \cdot \left (6 a^{2} c^{2} - 6 a b^{2} c + b^{4}\right )}{c^{3} \cdot \left (64 a^{3} c^{3} - 48 a^{2} b^{2} c^{2} + 12 a b^{4} c - b^{6}\right )}\right )}{12 a^{2} c^{2} - 12 a b^{2} c + 2 b^{4}} \right )} + \left (- \frac {b}{c^{3}} + \frac {\sqrt {- \left (4 a c - b^{2}\right )^{3}} \cdot \left (6 a^{2} c^{2} - 6 a b^{2} c + b^{4}\right )}{c^{3} \cdot \left (64 a^{3} c^{3} - 48 a^{2} b^{2} c^{2} + 12 a b^{4} c - b^{6}\right )}\right ) \log {\left (x + \frac {- 10 a^{2} b c - 16 a^{2} c^{4} \left (- \frac {b}{c^{3}} + \frac {\sqrt {- \left (4 a c - b^{2}\right )^{3}} \cdot \left (6 a^{2} c^{2} - 6 a b^{2} c + b^{4}\right )}{c^{3} \cdot \left (64 a^{3} c^{3} - 48 a^{2} b^{2} c^{2} + 12 a b^{4} c - b^{6}\right )}\right ) + 2 a b^{3} + 8 a b^{2} c^{3} \left (- \frac {b}{c^{3}} + \frac {\sqrt {- \left (4 a c - b^{2}\right )^{3}} \cdot \left (6 a^{2} c^{2} - 6 a b^{2} c + b^{4}\right )}{c^{3} \cdot \left (64 a^{3} c^{3} - 48 a^{2} b^{2} c^{2} + 12 a b^{4} c - b^{6}\right )}\right ) - b^{4} c^{2} \left (- \frac {b}{c^{3}} + \frac {\sqrt {- \left (4 a c - b^{2}\right )^{3}} \cdot \left (6 a^{2} c^{2} - 6 a b^{2} c + b^{4}\right )}{c^{3} \cdot \left (64 a^{3} c^{3} - 48 a^{2} b^{2} c^{2} + 12 a b^{4} c - b^{6}\right )}\right )}{12 a^{2} c^{2} - 12 a b^{2} c + 2 b^{4}} \right )} + \frac {- 3 a^{2} b c + a b^{3} + x \left (2 a^{2} c^{2} - 4 a b^{2} c + b^{4}\right )}{4 a^{2} c^{4} - a b^{2} c^{3} + x^{2} \cdot \left (4 a c^{5} - b^{2} c^{4}\right ) + x \left (4 a b c^{4} - b^{3} c^{3}\right )} + \frac {x}{c^{2}} \]
[In]
[Out]
Exception generated. \[ \int \frac {1}{\left (c+\frac {a}{x^2}+\frac {b}{x}\right )^2} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.07 \[ \int \frac {1}{\left (c+\frac {a}{x^2}+\frac {b}{x}\right )^2} \, dx=\frac {2 \, {\left (b^{4} - 6 \, a b^{2} c + 6 \, a^{2} c^{2}\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{{\left (b^{2} c^{3} - 4 \, a c^{4}\right )} \sqrt {-b^{2} + 4 \, a c}} + \frac {x}{c^{2}} - \frac {b \log \left (c x^{2} + b x + a\right )}{c^{3}} - \frac {\frac {{\left (b^{4} - 4 \, a b^{2} c + 2 \, a^{2} c^{2}\right )} x}{c} + \frac {a b^{3} - 3 \, a^{2} b c}{c}}{{\left (c x^{2} + b x + a\right )} {\left (b^{2} - 4 \, a c\right )} c^{2}} \]
[In]
[Out]
Time = 8.47 (sec) , antiderivative size = 261, normalized size of antiderivative = 1.74 \[ \int \frac {1}{\left (c+\frac {a}{x^2}+\frac {b}{x}\right )^2} \, dx=\frac {x}{c^2}+\frac {\frac {a\,\left (b^3-3\,a\,b\,c\right )}{c\,\left (4\,a\,c-b^2\right )}+\frac {x\,\left (2\,a^2\,c^2-4\,a\,b^2\,c+b^4\right )}{c\,\left (4\,a\,c-b^2\right )}}{c^3\,x^2+b\,c^2\,x+a\,c^2}+\frac {\ln \left (c\,x^2+b\,x+a\right )\,\left (-128\,a^3\,b\,c^3+96\,a^2\,b^3\,c^2-24\,a\,b^5\,c+2\,b^7\right )}{2\,\left (64\,a^3\,c^6-48\,a^2\,b^2\,c^5+12\,a\,b^4\,c^4-b^6\,c^3\right )}-\frac {2\,\mathrm {atan}\left (\frac {2\,c\,x}{\sqrt {4\,a\,c-b^2}}-\frac {b^3\,c^2-4\,a\,b\,c^3}{c^2\,{\left (4\,a\,c-b^2\right )}^{3/2}}\right )\,\left (6\,a^2\,c^2-6\,a\,b^2\,c+b^4\right )}{c^3\,{\left (4\,a\,c-b^2\right )}^{3/2}} \]
[In]
[Out]